package com.chenye.rabbitmq.rabbit;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Auther:chenye
 * @Data:2018/4/17
 * @Description:
 */
@Component
@RabbitListener(containerFactory = "secondFactory")
public class SecondRecevier {

    @RabbitListener(queues = "secondQueue")
    @RabbitHandler
    public void secondQueue(String content) {
        System.err.println("secondQueue : " + content);
        System.err.println(new Date());
    }
}
